﻿package 
{
	import chamans.engine.Basic;
	import chamans.webphp.*;
	import flash.display.*;
	import flash.geom.*;
	
	[SWF(backgroundColor="#000000", frameRate="120", width="960", height="540")]
	
	public class main extends Basic
	{
		public function main()
		{
			var DEF:Object={ titre:"BASE", message:"Choose demo in top menu" }
			super(INIT3D, null, DEF);
		}
		private function INIT3D():void
		{
			LOAD.SWF("assets/mainclip.swf",["logo", "casque", "vitre"], NEXT )
		}	
		private function NEXT(A:Array):void
		{
			logo=new A[0]();
			casque=new A[1]();
			vitre=new A[2]();
			view.addChild(casque);
			view.addChild(logo);
			front.addChild(vitre);
			casque.rotationX=112.5;
			casque.y=50;
			
			add_Forum(back, 270);
			add_Mail(back, -270);
		}
		//_____________________________________________php side
	 	private function add_Forum(target:Sprite, x:int=0):void
		{
			var FORUM:MovieClip=new Forum(SYS.FONT.CSS);
			target.addChild(FORUM);
		 	//FORUM.rotationY=5;
			FORUM.x=x;
		}
		private function add_Mail(target:Sprite, x:int=0):void
		{
			var MAIL:MovieClip=new Mail(SYS.FONT.CSS);
			target.addChild(MAIL);
		 	//MAIL.rotationY=-5;
			MAIL.x=x;
		}
		private var logo:MovieClip;
		private var casque:MovieClip;
		private var vitre:MovieClip;
}}

